// Decompiled by GOOSIN CO,LTD Copyright 2010 Pavel Kouznetsov.
// home page: http://www.Goosin.net
// Decompiler options: packimports(3) fieldsfirst ansi space 
// Source File Name:   WorkTree.java

package include.nseer_cookie;

import include.nseer_db.nseer_db;
import include.tree_index.Nseer;

public class WorkTree
{

	public WorkTree()
	{
	}

	public static void setZero(String unit_db_name, String mod, String first)
	{
		nseer_db db = new nseer_db(unit_db_name);
		Nseer n = new Nseer();
		try
		{
			String sql = (new StringBuilder("update ")).append(mod).append("_tree set workflow_tag='0' where hreflink='").append("check_list.jsp").append("' and file_path='").append(mod).append("/").append(first).append("/").append("'").toString();
			db.executeUpdate(sql);
			sql = (new StringBuilder("update ")).append(mod).append("_view set workflow_tag='0' where hreflink='").append("check_list.jsp").append("' and file_path='").append(mod).append("/").append(first).append("/").append("'").toString();
			db.executeUpdate(sql);
			db.close();
		}
		catch (Exception ex)
		{
			ex.printStackTrace();
		}
	}

	public static void setOne(String unit_db_name, String mod, String first)
	{
		nseer_db db = new nseer_db(unit_db_name);
		Nseer n = new Nseer();
		try
		{
			String sql = (new StringBuilder("update ")).append(mod).append("_tree set workflow_tag='1' where hreflink='").append("check_list.jsp").append("' and file_path='").append(mod).append("/").append(first).append("/").append("'").toString();
			db.executeUpdate(sql);
			sql = (new StringBuilder("update ")).append(mod).append("_view set workflow_tag='1' where hreflink='").append("check_list.jsp").append("' and file_path='").append(mod).append("/").append(first).append("/").append("'").toString();
			db.executeUpdate(sql);
			db.close();
		}
		catch (Exception ex)
		{
			ex.printStackTrace();
		}
	}
}
